package com.woniuxy.dao;

import com.woniuxy.entity.AddQuestionEntity;
import com.woniuxy.entity.QuestionInventory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface QuestionInventoryMapper {
    /**
     * @description:查询所有题库，正序排列
     * @author: HeMinghong
     * @date: 2022/5/31 13:09
     * @param: []
     * @return: java.util.List<com.woniuxy.entity.QuestionInventory>
     **/

    public List<QuestionInventory> findAllSubject();

    /**
     * @description:通过id查询题库信息
     * @author: HeMinghong
     * @date: 2022/5/31 13:09
     * @param: [id]
     * @return: java.util.List<com.woniuxy.entity.QuestionInventory>
     **/

    public List<QuestionInventory> findById(Integer id);

    /**
     * @description:通过科目查询题库
     * @author: HeMinghong
     * @date: 2022/5/31 13:08
     * @param:
     * @return:
     **/

    public QuestionInventory findBySubject(String subject);

    /**
     * @description:通过Uid查找题库
     * @author: HeMinghong
     * @date:  19:31
     * @param:
     * @return:
     **/

    public List<QuestionInventory> findByUid(Integer uid);
    /**
     * @description:通过id删除题库
     * @author: HeMinghong
     * @date: 2022/5/31 13:05
     * @param:
     * @return:
     **/
    public int deleteOne(Integer id);


    /**
     * @description:修改题库
     * @author: HeMinghong
     * @date: 2022/5/31 13:07
     * @param:
     * @return:
     **/

    public int updateOne(QuestionInventory questionInventory);
    /**
     * @description:新建题库
     * @author: HeMinghong
     * @date: 2022/5/31 13:07
     * @param:
     * @return:
     **/

    public int addOne(QuestionInventory questionInventory);

    List<Integer> findInventoryBySonId();


    /**
     * 查询题库列表，用于生成树形菜单
     * @return
     */
    List<QuestionInventory> findInventories();

    int findIdByAdd(AddQuestionEntity addQuestionEntity);


    String[] findSub();

    String[] findGrade();


    Integer findIdBySub(String sub);


    List<QuestionInventory> findAllSonSubject(Integer fid);

    List<QuestionInventory> findAllFatherSubject();


}